<template>
  <div>
    结账
    <el-row>
      <el-col :span="2">
        收货人:
      </el-col>
      <el-col :span="4">
        <el-input v-model="order.receiverName"></el-input>
      </el-col>
      <el-col :span="2">
        地址:
      </el-col>
      <el-col :span="4">
        <el-input v-model="order.receiverAddr"></el-input>
      </el-col>
      <el-col :span="2">
        电话:
      </el-col>
      <el-col :span="4">
        <el-input v-model="order.receiverPhone"></el-input>
      </el-col>
    </el-row>
    <el-button type="primary" @click="addOrder">提交订单</el-button>

  </div>
</template>

<script>
import axios from "axios"

export default {
  data() {
    return {
      order: {},
    }
  },
  methods: {
    addOrder() {
      axios.get("/project/order/addOrder", {params: this.order}).then(resp => {
        if (resp.data == "ok") {
          this.$router.push("/success");
        }
      })
    },
  }
}

</script>

<style scoped>

</style>